﻿using RabbitMQ.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RabbitMQCommon
{
    public static class FactoryConnecation
    {
        public static readonly ConnectionFactory factory = new ConnectionFactory()
        {
            HostName = "106.55.152.147",
            UserName = "admin",
            Password = "admin",
            Port = 5672,
            //VirtualHost = "/",
        };

        public static string Exchange = ExchangeName.simpleMode.ToString();

        public static string QueueName = Queue.simple.ToString();

        public static string RoutKey = RoutingKey.simpleKey.ToString();

    }

    /// <summary>
    /// 交换机
    /// </summary>
    public enum ExchangeName
    {
        /// <summary>
        /// 简单模式
        /// </summary>
        simpleMode = 0,
        workMode = 1,
    }

    /// <summary>
    /// 队列
    /// </summary>
    public enum Queue
    {
        /// <summary>
        /// 简单队列
        /// </summary>
        simple = 0,
        work = 1,

    }

    public enum RoutingKey
    {
        simpleKey = 0,
        workKey = 1,
    }


}
